package com.bjsxt.chapter4_prototype;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName Sheep
 * @Description 1997年英国的克隆羊多利
 * @Author 黑马程序员
 * @Date 11:01 2024/6/21
 * @Version 1.0
 **/
public class Sheep implements Cloneable, Serializable {

    private Date birthDay;

    private String name;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        // 直接调用object对象的clone()方法
        return super.clone();
    }

    public Sheep() {
    }

    public Sheep(Date birthDay, String name) {
        this.birthDay = birthDay;
        this.name = name;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
